#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int static_store = 30;
const char * static_pcg = "String Literal";

int main(void)
{
    int auto_store = 40;
    char auto_string[] = "Auto char Array";
    int * malloc_pi;
    char * malloc_pcl;

    malloc_pi = (int *)malloc(sizeof(int));
    *malloc_pi = 35;
    malloc_pcl = (char *)malloc(strlen("Dynamic String") + 1);
    strcpy(malloc_pcl, "Dynamic String");

    printf("static_store: %d at %p\n", static_store, &static_store);
    printf("  auto_store: %d at %p\n", auto_store, &auto_store);
    printf("   malloc_pi: %d at %p\n", *malloc_pi, malloc_pi);
    printf("  %s at %p\n", static_pcg, static_pcg);
    printf(" %s at %p\n", auto_string, &auto_string);
    printf("  %s at %p\n", malloc_pcl, malloc_pcl);
    printf("   %s at %p\n", "Quoted String", "Quoted String");

    return 0;
}